﻿using System;
using System.Collections.Generic;
using System.Diagnostics;

using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;

using NeedsMoreNinja.EventManager;

namespace SunXNA.RainbowXNA.Material
{
    class CMaterialManager
    {
        #region Public Types
        #endregion

        #region Private Member Variables

        private Effect[] m_globalEffects;
        private ContentManager m_contentManager;

        #endregion

        #region Protected Member Variables
        #endregion

        #region Puplic Member Properties

        public Effect[] Effects
        {
            get
            {
                return m_globalEffects;
            }
        }

        #endregion

        #region Public Member Functions

        public CMaterialManager( )
        {
            m_globalEffects = new Effect[ (int)MaterialType.NumberOf ];
        }

        public void Initialise( ContentManager contentManager )
        {
            m_contentManager = contentManager;
            m_globalEffects[(int)MaterialType.Flat] = m_contentManager.Load<Effect>("GameData/Shaders/FlatColoured");
            m_globalEffects[(int)MaterialType.Lambert] = m_contentManager.Load<Effect>("GameData/Shaders/Lambert");
            m_globalEffects[(int)MaterialType.TexturedLambert] = m_contentManager.Load<Effect>("GameData/Shaders/TexturedLambert");
            m_globalEffects[(int)MaterialType.SkinnedLambert] = m_contentManager.Load<Effect>("GameData/Shaders/SkinnedModel");
            m_globalEffects[(int)MaterialType.Terrain] = m_contentManager.Load<Effect>("GameData/Shaders/Multitextured");
        }

        #endregion

        #region Protected Member Functions
        #endregion

        #region Private Member Functions
        #endregion
    }
}
